//
//  JLButton.m
//  JL网易彩票progress
//
//  Created by sunjinliang on 15/11/11.
//  Copyright © 2015年 sunjinliang. All rights reserved.
//

#import "JLButton.h"

@implementation JLButton

//
//-(void)layoutSubviews{
//    [super layoutSubviews];
//    
//    self.titleLabel.x=0;
//    
//    self.imageView.x=CGRectGetMaxX(self.titleLabel.frame);
//    
//}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.titleLabel.font=[UIFont systemFontOfSize:12];
        self.imageView.contentMode=UIViewContentModeCenter;
   
    }
    return self;
}
-(CGRect)titleRectForContentRect:(CGRect)contentRect{
    CGFloat  titleX=0;
    CGFloat  titleY=0;
    CGFloat  titleW=contentRect.size.width-30;
    CGFloat  titleH=contentRect.size.height;
     CGRect titleFrame  =CGRectMake(titleX, titleY, titleW, titleH);
    return titleFrame;
}
-(CGRect)imageRectForContentRect:(CGRect)contentRect{
    CGFloat imgY=0;
    CGFloat imgH=contentRect.size.height;
    CGFloat imgX=contentRect.size.width-30;
    CGFloat imgW=30;
    
    CGRect imgFrame=CGRectMake(imgX, imgY, imgW, imgH);
    return imgFrame;
    
}
@end
